var app = getApp();
Page({
   data:{

   },
    onLoad:function(){
      var that = this;
        var text = wx.request({
          url: 'https://www.myfoxcloud.com',
          header:{
            'content-type':'text/html'
          },
          data: {},
          method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
          // header: {}, // 设置请求的 header
          success: function(res){
            // success
           console.log(res);
           that.setData({text:res.data});
          },
          fail: function(res) {
            // fail
            console.log('b');
          },
          complete: function(res) {
            // complete
            console.log('c');
          }
        });
        this.setData({text:'afdsafdsa'});
    }
});